import 'package:flutter/material.dart';

import 'shape.dart';

typedef ShapeBuilder = Path Function(Rect? rect);

/// 自定义形状
class DxCustomShape extends Shape {
  final ShapeBuilder? builder;

  DxCustomShape({this.builder});

  @override
  Path build({Rect? rect, double? scale}) => generatePath(rect: rect);

  Path generatePath({Rect? rect}) => builder!(rect);
}
